#include "Font.hpp"
/*
#include <ft2build.h>
#include FT_FREETYPE_H

#include <thread>
#include <chrono>

namespace ygg
{

static bool FTInitialized = false;
static FT_Library ft;

Font::Font(const std::string &filepath, int size)
{
	if(!FTInitialized)
	{
		if(FT_Init_FreeType(&ft))
		{
			printf("Could not init freetype library\n");
			std::this_thread::sleep_for(std::chrono::milliseconds(3000));
			exit(EXIT_FAILURE);
		}
		FTInitialized = true;
	}

	FT_Face face;
	if(FT_New_Face(ft, filepath.c_str(), 0, &face))
	{
		printf("Could not open font: %s\n", filepath.c_str());
		std::this_thread::sleep_for(std::chrono::milliseconds(3000));
		exit(EXIT_FAILURE);
	}
	FT_Set_Pixel_Sizes(face, 0, size);

	glActiveTexture(GL_TEXTURE0); // Use texture0 for fonts
	//glGenTextures(1, &mTex);
	//glBindTexture(GL_TEXTURE_2D, mTex);
	//glUniform1i(, 0)

	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);

	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}

void Font::render()
{
	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

	glDisable(GL_BLEND);
}

}
*/